\subsection{Generating random mass-conserving chemical reaction networks with a
prescribed number of terminal-linkage classes}

We now describe the sampling scheme used to generate networks for the numerical
experiments in this section.  The scheme generates networks with
a prescribed number of strongly connected components, number of complexes, and number of species.

To generate a directed graph with $m$ nodes and $l$ strongly connected
components, we iteratively generate Erdos Reyni\footnote{An Erdos Reyni graph
is a directed unweighted graph. Each edge is included with probability $p$ and
all edges are sampled iid.}  graphs until we sample one with the required
number of strongly connected components. Once the graph has been sampled, the
edges are weighted by assigning independent and uniformly distributed weights
in the range $(0,10]$. 

To generate the stoichiometry we use a parameter $r$ that defines the maximum
number of species that will form each complex. For each complex $j$ we first
sample the number of species that will participate and then sample the subset.
All draws are done uniformly and independently.  Finally we assign positive
values independently to each participating specie, by using the absolute value
of a standard normal unit variance distribution. To ensure mass balance we
normalize the sum of the stoichiometry of the species that participate in a
complex to one. 


